package com.erp.pojo.warehouse;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 台账表
 * @TableName warehouse_bench
 */
@TableName(value ="warehouse_bench")
@Data
public class WarehouseBench implements Serializable {
    /**
     * id
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 台账编号
     */
    @TableField(value = "outandput_id")
    private Long outandput_id;

    /**
     * 台账类型  1入库  2出库 
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 实际数量   /  出库数量
     */
    @TableField(value = "practicl")
    private String practicl;

    /**
     * 应该数量   /  应该数量
     */
    @TableField(value = "required")
    private String required;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Long user_id;

    /**
     * 创建人
     */
    @TableField(value = "create_name")
    private String create_name;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date create_time;

    /**
     * 仓库id
     */
    @TableField(value = "warehouse_id")
    private Long warehouse_id;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WarehouseBench other = (WarehouseBench) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOutandput_id() == null ? other.getOutandput_id() == null : this.getOutandput_id().equals(other.getOutandput_id()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getPracticl() == null ? other.getPracticl() == null : this.getPracticl().equals(other.getPracticl()))
            && (this.getRequired() == null ? other.getRequired() == null : this.getRequired().equals(other.getRequired()))
            && (this.getUser_id() == null ? other.getUser_id() == null : this.getUser_id().equals(other.getUser_id()))
            && (this.getCreate_name() == null ? other.getCreate_name() == null : this.getCreate_name().equals(other.getCreate_name()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()))
            && (this.getWarehouse_id() == null ? other.getWarehouse_id() == null : this.getWarehouse_id().equals(other.getWarehouse_id()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOutandput_id() == null) ? 0 : getOutandput_id().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getPracticl() == null) ? 0 : getPracticl().hashCode());
        result = prime * result + ((getRequired() == null) ? 0 : getRequired().hashCode());
        result = prime * result + ((getUser_id() == null) ? 0 : getUser_id().hashCode());
        result = prime * result + ((getCreate_name() == null) ? 0 : getCreate_name().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        result = prime * result + ((getWarehouse_id() == null) ? 0 : getWarehouse_id().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", outandput_id=").append(outandput_id);
        sb.append(", type=").append(type);
        sb.append(", practicl=").append(practicl);
        sb.append(", required=").append(required);
        sb.append(", user_id=").append(user_id);
        sb.append(", create_name=").append(create_name);
        sb.append(", create_time=").append(create_time);
        sb.append(", warehouse_id=").append(warehouse_id);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}